package com.en.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.en.mapper.InfoMapper;
import com.en.model.Info;
import com.en.service.InfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author wuhaitao
 * @description 针对表【info】的数据库操作Service实现
 * @createDate 2023-11-19 17:10:02
 */
@Slf4j
@Service
public class InfoServiceImpl extends ServiceImpl<InfoMapper, Info>
        implements InfoService {
    @Autowired
    InfoMapper infoMapper;

    public String getAppVersion() {
        LambdaQueryWrapper<Info> queryWrapper = new LambdaQueryWrapper<>();
        queryWrapper.eq(Info::getEnKey, "app_version");

        Info info = infoMapper.selectOne(queryWrapper);

        String value = info.getEnValue();
        log.info(value);

        return value;
    }


}





